﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *
 **/

using System.IO;

namespace Peter.Common.Interfaces
{
   /// <summary>
   /// Interface for the peter file watcher.
   /// </summary>
   public interface IPeterFileWatcher
   {
      /// <summary>
      /// Adds a watch for the given file.
      /// </summary>
      /// <param name="file">File to add watch for.</param>
      /// <param name="notification">Object to notify for change.</param>
      void AddWatch (FileInfo file, IFileChangedNotification notification);

      /// <summary>
      /// Adds a watch for the given directory.
      /// </summary>
      /// <param name="directory">Directory to add watch for.</param>
      /// <param name="notification">Object to notify for change.</param>
      void AddWatch (DirectoryInfo directory, IFileChangedNotification notification);

      /// <summary>
      /// Removes the watch for the given file.
      /// </summary>
      /// <param name="file">The file being watched.</param>
      /// <param name="notification">Notification to remove.</param>
      void RemoveWatch (FileInfo file, IFileChangedNotification notification);

      /// <summary>
      /// Removes the watch for the given directory.
      /// </summary>
      /// <param name="directory">The directory being watched.</param>
      /// <param name="notification">Notification to remove.</param>
      void RemoveWatch (DirectoryInfo directory, IFileChangedNotification notification);
   }
}
